//
//  MCSelectTranDateVc.swift
//  MCBodyBuildingPro
//
//  Created by Renlvshijie on 2023/5/19.
//

import UIKit

class MCSelectTranDateVc: MCBaseVc {
    
    let MCSelectTrainDateIdentifier = "MCSelectTrainDateIdentifier"
    
    
    @IBOutlet weak var timeDateCollectionView: UICollectionView!
    override func viewDidLoad() {
        super.viewDidLoad()
        let timeDateCollectionFlowLayout = UICollectionViewFlowLayout.init()
        
        self.timeDateCollectionView.setCollectionViewLayout(timeDateCollectionFlowLayout, animated: true)
        self.timeDateCollectionView.dataSource = self
        self.timeDateCollectionView.delegate = self
        self.timeDateCollectionView.register(UINib(nibName:"MCSelectTrainDateCell", bundle: Bundle.main), forCellWithReuseIdentifier: MCSelectTrainDateIdentifier)
        
    }
}

extension MCSelectTranDateVc:UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout {
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
        return UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
    }
    
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAt section: Int) -> CGFloat {
        return 10
    }
    
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAt section: Int) -> CGFloat {
        return 10
    }
    
    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
        return CGSize(width: 41, height: 41)
    }
    
    func numberOfSections(in collectionView: UICollectionView) -> Int {
        return 1
    }
    
    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return 30
    }
    
    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
        let cell:MCSelectTrainDateCell = collectionView.dequeueReusableCell(withReuseIdentifier: MCSelectTrainDateIdentifier, for: indexPath) as! MCSelectTrainDateCell
        
        return cell
    }
    
    
}
